home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
001
/
gt700.arc
/
GT700.DOC
< prev
next >
Wrap
Text File
|
1986-07-14
|
62KB
|
1,291 lines
Generic Terminal v7.00
Copyright (c) 1985, 1986: by P & M Software Co.
GT is short for Generic Terminal, a communications program for IBM Personal
Computers and compatible units. P & M Software Co. reserves the COPYRIGHT to
this program and all related materials. The user is granted a license to use
the program and is encouraged to make a donation if the program is found to be
useful. $35 is recommended. Send the donations to:
P & M Software Company
9350 Country Creek #30
Houston, Texas 77036
For further information about the GT registration plan, please read the file
called REGISTER.DOC, which comes with this program. It outlines the benefits
of full registration.
In addition, the user is granted the right to make unlimited copies of the
program and to distribute these copies as he/she desires, except that
P & M Software Co. reserves the sole right to distribute the program for
PROFIT. If the user distributes the product, the user may ask for a duplication
charge, not to exceed $6 per copy.
Features:
---------
1. ANSI Standard terminal emulation, compatible with many super-mini and
super-micro computers.
2. ANSI.SYS style color graphics, without the need of ANSI.SYS!
3. BASIC style PLAY for single voice music.
4. Multiple telephone directories, each with up to 999 entries. Records
the date and time of last contact with each BBS.
5. Circular redialing queue. Up to 125 numbers may be put into queue.
6. Capture Mode, limited only by the amount of disk space available.
A spill file is used, when the capture buffer is full. The capture
buffer can be reviewed on-line, before saving to disk.
7. ASCII file transmission, using XON/XOFF protocol and/or line-by-line
pacing and/or inter-character delays.
8. Full control of all communication parameters.
9. 40 macro keys, to store logon, passwords, etc.
10. Full printer support, using XON/XOFF flow control.
11. Xmodem/CRC protocol, using the CCITT polynomial: x^16 + x^12 + x^5 + 1.
12. Ymodem/CRC protocol, using the CCITT polynomial. Ymodem/Checksum
is NOT supported, because of the increased risk of error in the longer
packets. Ymodem uses 1024 bytes per packet vs. 128 bytes per packet in
Xmodem. During transmission of a file with Ymodem, if over 5 error are
encountered, the transmission will fallback to normal length blocks.
This saves time, because of the high overhead encountered with Ymodem
retransmission of error blocks.
13. Telink/CRC batch file transfer protocol is supported.
14. Kermit file transfer protocol is supported.
15. DOS Shell. Exit to DOS then return, GT stays in the background.
16. Interactive script language, to automate many repetitive tasks.
17. Optional LOG file.
18. Advanced "call progress" detection. Detects BUSY, VOICE, NO DIAL TONE,
and more, with modems that support extended result codes, such as the
USRobotics Courier 2400 Modem.
19. Use of the environment variable, GTPATH, to simplify use of the program
on a hard disk.
Installation Notes:
-------------------
Version 4.20 of GT introduces a new format for the phone directory. For that
reason, users of older versions of GT must run the program GT-UTIL to convert
their old directories to the new format. I think you will like the new format,
it includes the date & time that you last called each number in the directory.
When run, GT-UTIL will rename your original directory to OLD_GT.DIR, so that
you will retain a copy of it for emergency use.
The program comes with two executable files, the .COM, which is the main
program, and the .000, which contains the overlays. The overlays, the .000
file, must be available to the program at all times. The main program, the
.COM, may be removed after the program has begun. There are two methods
available to have GT locate the required overlays and configuration files.
The 1st, possibly the easiest to use, is to start GT in the directory that
contains all of these files. The program detects the default directory and
will refer back to it when needed, even after the user has changed directories.
The 2nd method is to use an Environment variable, GTPATH, to point to the
directory containing GT's files. This method is more difficult to setup, but
is much more flexible once the program is properly installed. The phone
directory may be placed on any drive and directory, the path to the phone
directory is set into the configuration via the ALT-I command.
Example of Environment Usage
----------------------------
Assuming that all the GT files have been placed in a directory named
\GT on drive C. Then in your AUTOEXEC.BAT place the following:
set PATH=C:\GT
set GTPATH=C:\GT
Of course, the PATH variable may have additional files listed, using
the semi-colon to separate the names. The GTPATH variable must have
only 1 parameter, the home directory for all the GT files, except the
Phone Directory, which may be placed anywhere, as indicated above.
Distributed with the program is a file called GT.BAT. It can be used to
install and run the program from a RAM disk. To use GT.BAT, place the program
disk in one of the floppy drives and make it the default, then enter the
following command:
GT d1 d2 Where: "d1" is the drive with the program
disk and "d2" is the RAM drive.
Example: "GT A: C:"
If the program is used without a modem, using a direct cable connection, all
the dialing and modem control strings in the config file should be set to
empty strings, for example the line with the MI parameter should read: "MI=".
Also, when using a direct cable connection, the FC parameter should be set
to TRUE.
The program has been written to use Hayes compatible commands with the modem.
Because the program controls the modem via the DTR signal, Data Terminal Ready,
the cable between the computer and modem must provide a connection for pin 20
and the modem should have the internal switches set so that the DTR signal is
monitored.
The program uses the Carrier Detect signal from the modem to detect when a call
has been connected and when to stop redialing, for this reason the modem should
have it's switches set so that the Carrier Detect signal is ONLY sent when
present on the phone line. If this is not possible, set the FC= parameter, to
TRUE, however when Carrier Detect is "forced", it is not possible to do
"redial" or "circular dial", because the program would never know when to stop!
Support For USRobotics Courier 2400
-----------------------------------
Here are the proper switch settings for the Courier modem:
Switch Setting
------ -------
* 1 UP, Normal DTR. This is not the factory setting,
so it MUST be changed by the user.
2 DOWN, Numeric Result Codes. This is the preferred
setting for use with terminal programs, but is not
absolutely required.
3 DOWN, Result Codes are displayed.
4 DOWN, No Command Echo. Again, this is preferred, but
not required.
5 Doesn't matter to GT.
* 6 UP, Normal Carrier is sent to computer when on-line
only. This is not the factory setting, so it MUST
be changed by the user.
7 Doesn't matter to GT.
8 DOWN, Use Normal AT commands.
9 Doesn't matter to GT.
10 Doesn't matter to GT.
Quad Switch UP, Use Normal Pin Assignments.
*IMPORTANT: These switches MUST be set properly if the program is to
have any chance to function in a normal manner.
Modem Result Codes
------------------
The proper setting of the modem result codes is important, if call progress
detection is to work properly. Again, one must use the ALT-I command, then
select the modem result codes option. The program will present a list of
possible results and the corresponding codes that the modem uses to signal
each result. You may change any or all of the result codes, each code may
be any string of characters, up to 12 positions long. The default codes are
set to the numeric codes supported by the USRobotics Courier 2400 Modem, if
your modem does not signal all of the possible results, DO NOT DELETE the
code for results that are not supported, instead change them to some
impossible value, for example: "N/A". In this way, the program will not
mistake some extraneous information as a code.
Quick Introduction
------------------
Most of the features of the program are self-documenting, however for the sake
of the novice user, some explanation is necessary.
The program is distributed in .COM and .000, which can be executed immediately
by placing your disk into drive A, changing the default drive to A, if not
already, then typing the name of the program, GT700.
Once the user has successfully executed the program, the copyright notice will
appear, and the user will be asked if music is wanted, strike a "y" if you want
music, if not, then strike any other key. The on-line screen will then appear.
At the bottom of the on-line screen appears a reminder of the most frequently
used commands. These commands may be selected by depressing and holding the
ALT key along with the indicated ALPHA key. If the user needs a command that
does not appear on the screen, a complete list of available commands can be
obtained by selecting ALT-H. Commands may be selected while the HELP screen is
still on screen, so that the user does not need to call up the HELP screen
repetitively.
There are a number of status indicators that can appear in line 25 of the
screen:
* .... Capture mode is on.
^ .... Caps Lock is on. The ^ will show as the
Up-Arrow on the screen.
# .... Num Lock is on.
Q .... Beeps are off.
C .... Carrier is present. When carrier is lost, an
alarm sounds.
H .... Half-duplex is on.
Here is a brief description of each command:
--------------------------------------------
ALT-A Transmit a file using the ASCII XON/XOFF protocol, where the
DC1 character is used for XON and the DC3 character is used
for XOFF. If the Pacing Character is set, then line-by-line
pacing is also done, i.e. the program will wait for the pacing
character to echo from the host at the end of each line, thereby
insuring that an overrun error will not occur. The default is
no line-by-line pacing. Also associated with the ASCII file
transmit is the End-of-Line Mode, it determines what characters
are sent to the host at the end of each line. The normal default
for IBM compatibile hosts is CRLF, i.e. a Return and a Linefeed,
however some hosts, for example UNIX, require just LF, and others
may require only a CR. These are the three options for End-of-line
Mode. Also, the user may specify an inter-character delay, in
milleseconds, the default delay is set to 0. The Pacing Character,
the End-of-Line Mode and the inter-character delay, are options in
the configuration file. Use the ALT-I command to alter the
configuration.
ALT-B Send BREAK signal to host computer. The serial port is forced
into the spacing state.
ALT-C Turn capture mode ON, if it is OFF, or OFF if it is ON. When this
mode is turned OFF, either thru the ALT-C command or with the ALT-X
command, the user will be prompted for a file name wherein to save
the contents of the capture buffer. During capture mode operations,
a "*" will appear in the lower left corner of the screen. Capture
mode is useful for recording complete sessions for review later, so
you don't read so much on those long distance phone calls.
When the in-memory capture buffer is full, the program will dump
to a spill file on disk, the file name used will be $$SPILL. The
operation of the spill file is automatic, but if the program is
interrupted for some reason, the file may remain cataloged.
Therefore, the user should remove this file when required. It
will be placed in the directory with the overlay file, the .000 file.
ALT-8 Review the in-memory portion of the capture buffer. The PgUp, PgDn,
Home and End keys may be used to move around in the buffer. PgUp
and PgDn move thru the buffer a page at a time, the Home and End
keys move you to the start or end of the buffer. Use the Esc key
to quit viewing the buffer.
ALT-D Modem dialing and phone directory management. The phone directory
may have up to 999 entries, if there is enough disk space. The
directory screen will automatically disappear whenever carrier is
detected, unless the Forced Carrier config param is "TRUE".
ALT-E Turn Half Duplex ON if it is OFF, or OFF if it is on. If Half Duplex
is ON, then a "H" will appear in the lower right corner of the screen
to remind the user. Half duplex is used when the host does not echo
what you type.
ALT-F Fix time. That is, mark the current time, so that you can measure
time used, with the ALT-U command.
ALT-G Redial the last number dialed. This command will loop continuously
until carrier is signaled by the modem, the Forced Carrier config
param is "TRUE", or the user presses a key.
ALT-H Produces the HELP screen for the user.
ALT-I Reconfigure the program defaults. The parameters listed below for
the .CNF file can be changed via this command.
ALT-J Display version number of GT in use.
ALT-K Kill a file. Delete a file from the disk.
ALT-L Display disk directory, under a user supplied mask. For example,
to see all files on the logged drive and current directory, the
user would enter the mask "*.*", when prompted. Or see just the files
with an extension of .PAS by entering the mask "*.pas", when prompted.
ALT-M Macro key management. Allows the user to define the contents of the
function keys F1 thru F10, and all combinations of the function keys
and shift, Ctrl or Alt. This gives the user 40 different macro keys.
ALT-N Allows the user to change to a new logged drive and/or new working
directory.
ALT-O Sort the dialing directory into ascending sequence by name, number
or date. Performs a IN MEMORY sort, so there must be enough memory
to hold all the phone directory entries.
ALT-P Print a file.
ALT-Q Hang-up the phone line, put the modem "ON HOOK". Drops the DTR
signal to the modem for 3 seconds and resets the UART, and sends the
modem initialization string to the modem (see the config table below).
ALT-R Receive a file using Xmodem or Ymodem protocol. Whichever protocol,
selected by the host, will be used. Communications parameters are
automatically changed to/from 8 bit no parity. CRC is used
automatically, if the remote system supports it. In addition, the
TELINK batch protocol may be used. In order to invoke the TELINK
protocol, the user must first prepare the Host cpu to use the TELINK
protocol, then after the ALT-R key has been pressed and GT has
requested the filename, the user should respond with: [d:\path\]*
the [] indicates that the drive specifier and path are optional.
Under the TELINK protocol, the filenames will be supplied by the
Host cpu. Using TELINK preserves the exact file size and creation
date. If the carrier signal from the host is lost during file
transfer, the alarm will sound and the "Carrier Loss" window will
open. The alarm will continue to sound until the user strikes a
key. Use ALT-4 for Kermit file reception.
ALT-S Switch communication parameters. The program starts with these
default values: 1200 baud, No Parity, 8 data bits, 1 stop bit.
Permissible values for the baud rate are: 300, 1200, 2400, 4800,
or 9600.
ALT-T Transmit a file using Xmodem protocol. Communications parameters
are automatically changed to/from 8 bit no parity. CRC is used,
if the remote system requests it. Also, the TELINK protocol is
used if the remote system supports it. Using TELINK, it is possible
to transfer up to 30 files at one time. If the user wishes to
perform a batch transfer, he must specify the names of the files
to transfer using the DOS wildcard notation; for example, to
transfer all files with the .PAS extension, when asked for the
filename, respond with "*.PAS". A drive and path may optionally
be specified with the filename. The first 30 files found matching
the criterion will be transmitted. If the carrier signal from the
host is lost during file transfer, the alarm will sound and the
"Carrier Loss" window will open. The alarm will continue to sound
until the user strikes a key. Use ALT-5 for Kermit file transmission.
ALT-7 This command is similar to the ALT-T command above, however the
Ymodem protocol is used. It is not possible to use Ymodem
automatically for transmission, because the protocol provides no
means for the host to signal the capability. So, GT will use Ymodem
to transmit files only when ALT-7 has been selected.
ALT-U Used, time. Report the time used since the the last ALT-F command
and the last dial of the phone or the start of the program,
whichever occured last. Total elapsed time in hours, minutes and
seconds, is reported.
ALT-V View the contents of a file, uses the same style as MORE, the DOS
utility. Use the "End" key to stop the command.
ALT-W Clear the screen.
ALT-X Terminate and return to DOS. If other windows are open on the screen,
this command will be deferred until all windows have been closed.
ALT-Y Copy a file. This procedure will copy any unprotected file.
Filenames must be fully specified. No wildcards are allowed, ONLY
the current drive and directory need not be specified.
ALT-Z Toggle monitor mode on/off. In monitor mode, all codes are shown
so that the user may see exactly what is being sent by the host
computer. Control codes are shown with the ^ symbol preceding,
i.e. ^[ is the ESC code, ^X is the CAN code, etc. You must refer
to an ASCII code chart for a complete list.
ALT-1 DOS Shell port. GT stays in the background, while you exit to DOS.
When you want to return to GT, just issue the "EXIT" command and
you will return to GT. Note: you need a lot of memory to do this,
more than 256k is recommended.
ALT-2 Dump screen to the file "$$SCREEN". If the file already exists,
then the screen is appended to the file, otherwise the file is
created and the screen written to it.
ALT-3 Execute a script. Scripts may also be executed by placing the
name of the script file on the DOS command line that starts GT.
For example: "A>GT700 filename", would begin GT and cause the
script stored in filename to begin automatically. Refer to the
description of the script language at the end of this document.
ALT-4 Kermit file reception. Batches of files may be received.
ALT-5 Kermit file transmission. Batches of files, up to 30, may be
transmitted, use the * and ? wildcard notation to designate the
batch to send.
ALT-6 Begins execution of the "circular dialing" queue. All "marked"
entries in the phone directory will be dialed in-turn, until a
connection is made or the user stops the execution by entering
a 'Q'. Individual entries may be canceled by pressing 'C', while
the entry is being processed on the screen. The user may
immediately proceed to the next entry in the queue by pressing
the 'N'. Use the 'G' command on the Phone Directory screen to
"mark" entries for the circular dialing queue. See explanation of
the Phone Directory commands below.
ALT-9 Toggle the beeps ON/OFF. Go into quiet mode or back to normal mode.
Does not change the playing of music, just the bell.
ALT-0 Make a manual entry in the Log file. Log file must be open before
you can make entries. Open the Log file by setting the Log File
flag = TRUE on the config page. See the ALT-I command.
^PrtSc Toggle the printer ON/OFF. Hold the "Ctrl" key, then press the
"PrtSc" key. Use "Fn/Echo" on the PCjr.
The Phone Directory has a list of commands also:
------------------------------------------------------------
A = Add an entry to the dialing directory.
C = Change an entry in the dialing directory.
K = Kill an entry in the dialing directory, a sort of the directory is
recommended after this option or the Add option.
L = Locate a BBS by name. You may specify partial names and the search is
not sensitive to capital letters. The search begins with the current
directory screen and proceeds to the end of the directory.
N = Find the next occurance of the last BBS requested in the 'L' command,
above. The search begins where the previous search left off and finds
the next match, if any.
M = Dial a number not in the directory. The user is prompted for new
communications parameters.
D = Dials a number from the directory, and automatically changes the
communications parameters. To indicate that the phone number needs
to be prefixed, put a "-" in front of the directory number, for example
"-74", would prefix and dial the 74th number in the directory.
G = Mark a BBS for entry into the "circular" dialing queue. If already
marked, the mark will be removed. So, this command acts as a toggle
between the marked and unmarked state.
E = Exchange the current directory with another one. For example, one
could have two directories, 1 for local BBS's and 1 for long distance
calls. Don't give any path information, when entering the filename
this option calls for - ALL phone directories are located using the
"Directory PATH" from the configuration file. Use the ALT-I command
to set this path as required.
PgDn = Display the next page of the directory.
PgUp = Display the previous page of the directory.
Home = Go to the first page of the directory.
End = Go to the last page of the directory.
Q = Quit, returns to the online screen.
When editing Phone Directory entries or Macro Key definitions, the program
responds to the following editing keys as indicated:
Backspace .... Delete character to the left of cursor.
Del .......... Delete character under the cursor.
End .......... Move the cursor to the end of the field.
^End ......... Erase from the current cursor position to the end of the
field. The ^ symbol indicates that you must hold the "Ctrl"
key, then press the "End" key.
Home ......... Move the cursor to the start of the field.
Ins .......... Toggle between insert and overwrite mode. When in insert mode
the cursor becomes fat.
Left Arrow ... Move the cursor to the left 1 position.
Right Arrow .. Move the cursor to the right 1 position.
Return ....... Finish the current field and move to the next.
There are several files associated with the system.
Here is a description of each:
GT700.COM ...... Absolute program. The one to execute.
GT700.000 ...... Overlays, must accompany the .COM file.
GT700.DOC ...... This file. The documentation.
GT.DIR ......... The phone directory, data file.
GT.KEY ......... Macro key definitions, data file.
GT.CNF ......... The configuration, data file.
GT.BAT ......... Sample runstream to execute GT from ramdisk.
GT.LOG ......... Log file. Note: don't edit the log file with
an editor which places a CPM EOF (Hex 1A) at the
end of a file. GT is unable to append log entries
to a file which ends with the CPM EOF - a quirk of
Turbo PASCAL.
GT-UTIL.COM .... Program to convert old directories, prior to v4.20,
to new format, produce printed listing of phone directory,
import text list of BBS's to GT format directory.
GT-UTIL.PAS .... Source code for GT-UTIL.COM.
GT-UTIL.DOC .... Short doc file for GT-UTIL.
SCRIPT ......... A sample script for use with GT.
REGISTER.DOC ... Description of the registration plan.
FORM.DOC ....... A registration form, ready to be filled in and printed.
In position 1-3 of each record in the configuration file is a code to identify
a parameter. After the "=", the value of the parameter appears. The codes are:
CM= COM port number, 1 or 2.
ST= Number of Stopbits.
DA= Number of Databits.
PA= Parity. 0=None,1=Even,2=Odd
BA= Baud Rate. 300,1200,2400,4800, or 9600.
WA= Number of ticks in 1/3 of a second, at 4.77 MHz clock. The value
should be larger if the clock in your CPU is faster. The units for
the value is milleseconds, and it is used for waiting, hence the WA=.
For example, if your CPU runs a twice the 4.77 MHz rate, then the
value of WA= should be 666.
PR= Dialing Pre String.
PO= Dialing Post String, use the | character where a Return is needed.
PF= Phone number prefix. This item is used when going thru a PBX or when
using an alternate long distance carrier. For example this field would
contain "9," for use with a PBX, to get an outside line (don't include
the " characters!).
MI= Modem initialization string. The default value, AT E0 V0 S0=0|, will
cause the modem not to answer the phone. Again, use the | character
where a Return is needed.
SY= Modem command string to turn the speaker ON.
SN= Modem command string to turn the speaker OFF.
RT= After carrier timeout has occured, this is the time between redials,
in seconds.
FC= Forced Carrier. Some modems force carrier even when a call is not in
progress, if this is the case, set this parameter to TRUE.
CT= Timeout time for carrier to appear, in seconds.
DP= Directory PATH. This variable tells the program where to look for the
phone directory. This param is provided mainly for people who wish to
put the dialing directory on a RAM-disk.
XO= The decimal value of the XON character. Used to control data flow.
Starts data flow after XOFF has been issued.
XF= The decimal value of the XOFF character. Used to control data flow. Stops
data flow when issued. Helps insure that buffer overflow does not occur.
VT= If TRUE, turns on ANSI emulation, using ANSI escape codes. If ANSI
emulation is requested, music will not be played, and will show on the
screen as text. This happens because of a conflicit between the full
ANSI definition and the musical notes.
LF= Auto Linefeed mode. If TRUE, then a Linefeed will be automatically
supplied whenever a Return is recieved.
FG= The default foreground color number. Any one of the 16 values in the
table below.
BG= The default background color number. Any one of the DARK shades,
0-7, from the table below.
CC= The comment character used with the macro keys.
MX= Number of Xmodem buffers to allocate. 4 - 255 are the legal values.
A smaller number should be used on systems with only 128k, larger values
can be used if more memory is available. Each buffer takes 128 bytes.
PC= The Pacing Character. This is the character echoed by the host at the
end of each line. If you set this character, the program will wait for
it to be echoed by the host at the end of each line during an ASCII
file transmission. The default is no Pacing Character. The
abbreviations CR and LF may be used in this field to indicate the
Return and Linefeed characters, as well as the | character for Return.
EL= End-of-Line Mode. This determines the line terminating characters sent
to the host, during ASCII file transmit, to delimit the end-of-line.
Defaults to CRLF, Return and Linefeed. The other options are LF, only
Linefeed, and CR, only Return.
AD= ASCII inter-character delay. Specified in milleseconds. The default
value is 0.
WF= Window foreground color number. Anyone of the 16 values from the table
below.
WB= Window background color number. Anyone of the DARK shades, 0-7, from
the table below.
WR= Windowframe foreground color number. Anyone of the 16 values from the
table below.
WS= Windowframe background color number. Anyone of the DARK shades from
the table below.
LG= If TRUE, GT will keep a log of all BBS's called and files transfered.
Default is FALSE.
PD= Current phone directory name. Default is 'GT'.
RC= Result codes. The code is defined by the numeric code and the code
actually returned by the modem. There are 13 possible codes, only 12
of which are used. Example: RC=1,CONNECT
* = Comment lines.
Note: these entries may either be changed via the ALT-I command, or with
any text editor that produces standard ASCII files, such as EDLIN.
For Example:
CM=1 ;
ST=1 ;
DA=8 ;
PA=0 ;
BA=1200 ;
WA=333 ;
PR=ATDT ;
PO=| ;
PF= ;
MI=AT E0 V0 S0=0| ;
SY=AT M1| ;
SN=AT M0| ;
RT=60 ;
FC=FALSE ;
CT=35 ; The DEFAULT defaults!
DP=A:\ ;
XO=17 ;
XF=19 ;
VT=FALSE ;
LF=FALSE ;
FG=15 ;
BG=0 ;
CC=; ;
MX=64 ;
PC= ;
EL=CRLF ;
AD=0 ;
WF=7 ;
WB=0 ;
WR=15 ;
WS=0 ;
LG=FLASE ;
PD=GT ;
RC=0,0 ; Numeric result codes returned by
. ; modem are the default.
. ; There are 13 different results codes,
. ; but only 12 are actually used.
RC=12,12 ;
Color Number Table:
Dark Colors Light Colors
----------- ------------
0 : Black 8 : Dark Gray
1 : Blue 9 : Light Blue
2 : Green 10 : Light Green
3 : Cyan 11 : Light Cyan
4 : Red 12 : Light Red
5 : Magenta 13 : Light Magenta
6 : Brown 14 : Yellow
7 : Light Gray 15 : White
Received Character Processing - ANSI Emulation Mode.
----------------------------------------------------
Cursor Up .................................. ESC [ Pn A
Cursor Down ................................ ESC [ Pn B
Cursor Forward ............................. ESC [ Pn C
Cursor Backward ............................ ESC [ Pn D
Cursor Position ............................ ESC [ Pl ; Pc H
Cursor Position (Home) ..................... ESC [ H
Horizontal and Vertical Position ........... ESC [ Pl ; Pc f
Horizontal and Vertical Position (Home) .... ESC [ f
Set Scrolling Region ....................... ESC [ Pt ; Pb r
Set Origin Mode ......see notes below....... ESC [ ? 6 h
Reset Origin Mode .......................... ESC [ ? 6 l
Index ...................................... ESC D
Reverse Index .............................. ESC M
Reverse Linefeed ........................... ESC I
Next Line .................................. ESC E
Save Cursor ................................ ESC 7
Restore Cursor ............................. ESC 8
Cursor Key Mode Set ........................ ESC [ ? 1 h
or ESC =
Cursor Key Mode Reset ...................... ESC [ ? 1 l
or ESC >
Select US Character Set .................... ESC ( B
Select Line Drawing Character Set .......... ESC ( 0
Turn Off Character Attributes .............. ESC [ m
Selects Bold Characters .................... ESC [ 1 m
Selects Underlined Characters .............. ESC [ 4 m
Selects Blinking Characters ................ ESC [ 5 m
Selects Reverse Video Characters ........... ESC [ 7 m
Set Horizontal Tab Stop .................... ESC H
Clear A Horizontal Tab Stop ................ ESC [ g
Clear All Horizontal Tab Stops ............. ESC [ 3 g
Erase From Cursor To End Of Line ........... ESC [ K
Erase From Beginning Of Line To Cursor ..... ESC [ 1 K
Erase Complete Line ........................ ESC [ 2 K
Erase From Cursor To End Of Screen ......... ESC [ J
Erase From Beginning Of Screen To Cursor ... ESC [ 1 J
Erase Complete Display ..................... ESC [ 2 J
Delete Character At Cursor ................. ESC [ Pn P
Insert Line At Cursor ...................... ESC [ Pn L
Delete Line At Cursor ...................... ESC [ Pn M
Select Insert Mode ......................... ESC [ 4 h
Reset Insert Mode .......................... ESC [ 4 l
Turn Printer On ............................ ESC [ ? 5 i
Turn Printer Off ........................... ESC [ ? 4 i
Turn Printer Controller On ................. ESC [ 5 i
Turn Printer Controller Off ................ ESC [ 4 i
Print Screen ............................... ESC [ i
Request Cursor Position Report ............. ESC [ 6 n
Response: Cursor Position Report .... ESC [ Pl ; Pc R
Request ID ................................. ESC [ c
Response: Terminal Type ............. ESC [ ? 6 c
Notes: ESC is used to represent the escape character, decimal 27.
Pn represents a variable numeric parameter, the parameter is
a decimal number transmitted to the program by using ASCII
characters. Pl represents the LINE, and Pc represents the
COLUMN, these are numeric parameters sent using ASCII
characters. Pt represents the TOP LINE of a scrolling
region, and Pb represents the BOTTOM LINE of a scrolling
region, these are numeric parameters sent using ASCII
characters. The spaces shown are for readability, they are
not sent by the Host.
When "Origin Mode" is set, the cursor is confined to the
scrolling region. Whenever a change takes place in the "Origin
Mode", the cursor is moved to the home position. The cursor
is also moved to the home position whenever a change is made
in the scrolling region.
Transmitted Characters - ANSI Emulation Mode.
---------------------------------------------
Function Keys .............................. User Programmable.
End ........................................ ESC O R
Ctrl-End ................................... ESC O S
Del ........................................ DEL
Ins ........................................ ESC O n
Home ....................................... ESC [ H
PgUp ....................................... ESC [ O r
PgDn ....................................... ESC [ O q
Shift-Tab .................................. ESC [ O x
Left Arrow ................Normal........... ESC [ C
Keypad Mode...... ESC O C
Right Arrow ...............Normal........... ESC [ D
Keypad Mode...... ESC O D
Up Arrow ..................Normal........... ESC [ A
Keypad Mode...... ESC O A
Down Arrow ................Normal........... ESC [ B
Keypad Mode...... ESC O B
Others ..................................... Standard Values.
Note: The blanks are included for readability only.
Scripts
-------
The script language allows the user to automate most of the features of
GT. Folowing is a description of the script syntax. Several preliminary
comments about scripts: 1) they can be canceled by hitting either Ctrl-C
or Ctrl-K, 2) the strings and other literal information in the syntax
should be enclosed within "..." if they contain white-space, blanks,
tabs or commas, otherwise they need not be so enclosed. All fields and
operators must be separated on the line by the use of white-space.
Scripts are interactive, so that the user can modify them on-the-fly.
In order to do this, 10 variables have been setup, they are called V0
thru V9. They are referenced in either assignment statements or READLN
statements. In order to use them, a technique called "variable substitution"
is used. Instead of the V, the variable number is prefixed with a %, thus
V0 thru V9, become %0 thru %9. Variable substitution may be done on any
part of any command, the only rule is that the variable must be assigned
a value prior to use, otherwise it will be a null string. The data in
variables is stored as strings of characters, up to 80 characters long.
At the end of this document there is a command summary for the script
commands. They are listed in alphbetical order in the summary.
Command Description and Example
------- -----------------------
SET Used to set the serial port parameters: baud rate,
parity, data bits and stop bits.
Example: SET 1200,N,8,1
This would set 1200 baud, no parity, 8 data bits and
one stop bit. Legal baud rate values are: 300, 1200,
2400, 4800 and 9600. Legal parity values are N=none,
E=even and O=odd. Legal data bits are 7 or 8. Legal
stop bits are 1 or 2.
ONLINE Used to exit, temporarily, from script to manual mode.
Useful when using a script to call a host and then go
into manual operation once connected.
Example: ONLINE
Note, when you press ALT-X, you exit back to the script
and script execution begins where it left-off.
EXIT Used to exit the program from within a script.
Example: EXIT
ECHO Causes script commands to be displayed on the screen
as they are executed. Useful for debugging new scripts.
Example: ECHO
SCREEN Used to turn-off the screen display, i.e. stop incoming
data from appearing during the WAIT command.
Example: SCREEN OFF
turns screen off.
SCREEN ON
turns screen on.
CAPTURE Used to turn-on Capture Mode from within a script.
There are two forms: "CAPTURE" and "CAPTURE filename".
The first form is used to begin capturing data, the
second form terminates Capture Mode and names the file
to receive the captured data.
Example:
CAPTURE { Begin capturing here }
.
.
.
CAPTURE filename { Finish capturing here }
CD Change directories.
Example: CD directory
Works like the DOS equivalent, except that it has no
display function.
Drive Change Change default disk drive.
Example: C:
Works like the DOS equivalent.
DUPLEX Toggle between full and half duplex. The starting
condition is FULL duplex.
Example: DUPLEX
QUIET Toggle the beeps on and off. The starting condition is
to have beeps ON.
Example: QUIET
PRINT Toggle the printer on and off. The printer will run as
data is received from the host. Equivalent to Ctrl-PrtSc.
Example: PRINT
HANG-UP Used to hang-up the modem.
Example: HANG-UP
BREAK Used to send a Space Break to the host. Some hosts
will use this to wake-up and logon the user, mostly
UNIX systems and other mini-computers.
Example: BREAK
WAIT Used to make the execution of the script wait for a
particular string to be sent from the host.
Example: WAIT FOR string
or: WAIT n FOR string
The string may be in "...", if embedded blanks are
required. In the 2nd form, the "n" represents the
number of seconds to wait before timing-out the host.
Note, the timeout clock only counts down when no data
is being sent by the host. If the first form is used,
the default time-out period is 40 seconds.
AWAIT Used to delay execution of the script until the
designated time.
Example: AWAIT hh:mm:ss
or: AWAIT 9:45:00
The time is formated hours, minutes and seconds, all
fields must be entered.
TWAIT Timed wait, in milleseconds. The maximum wait period
is 32767 milleseconds.
Example: TWAIT number
The "number" is the number of milleseconds
to delay the execution of the script.
SEND Used to send a string to the host. The string may
contain the | character, which will be changed to a
Carriage Return.
Example: SEND string
Again the string may be in "...", if embedded blanks are
required.
SENDLN Same as SEND above, but sends a Carriage Return at the
end of the string.
Example: SENDLN string
WRITE Used to write a string to the screen, does not send
to the host.
Example: WRITE string
WRITELN Used to write a string to the screen with a Carriage
Return, Linefeed combination at the end of the line,
does not send to the host.
Example: WRITELN string
DIAL Used to dial the modem.
Example: DIAL phone# WITH REDIAL
or
DDIAL name WITH REDIAL
The phrase WITH REDIAL is optional.
In the second form, DDIAL, the "name" is found in
the user's dialing directory and the parameters for
baud rate, and phone number are set automatically.
If the "name" cannot be found in the directory, then
the script will resume execution after the next END
statement, as if the host was unavailable. The
"name" does not have to be complete, it searches for
the first BBS name in the directory that contains
"name" within it. Upper and lower case letters are
treated the same.
The commands, following the DIAL or DDIAL command,
may be grouped together to form the commands required
to access a particular host. The END command is used
to mark the end of such a group. If a connection
cannot be made with the host, then the commands between
the DIAL and the END are skipped. If no END is found,
the rest of the commands in the script are skipped.
Please refer to the sample script that comes with the
documentation.
EXCH Causes the program to exchange directories. So that
more than 1 phone directory may be used.
Example: EXCH DIRECTORY filename
Where the word DIRECTORY is optional. The filename
is the name of the new phone directory. Note, there
is one difference between the script command and the
manual, ALT-D, method to do this: this file must exist
or an error will occur. With the manual method, the
file will be created, if it does not already exist.
Note: The filename on the EXCH command must not contain
any path information. The program looks for all
phone directories under the "Directory PATH" from
the configuration file. Use the ALT-I command to set.
END Used with DIAL to group commands for a particular host.
NAME Used to name the host that the user is calling. Shows
up on the Redial window. Used with the DIAL command.
Not used with the DDIAL command, because the BBS name
from the dialing directory is used.
Example: NAME string
AUTOBAUD Used after the DIAL or DDIAL command to set the hosts
baud rate to the caller's. The AUTOBAUD command can use
the Carriage Return or the blank to set the rate. Usually,
the Carriage Return is used and it is the default, however
some systems require the blank.
Example: AUTOBAUD
for Carriage Return use.
AUTOBAUD BLANK
for blank use.
FLUSH Flushes the contents of the serial input buffer.
Useful prior to an ONLINE or before dialing a new
host.
Example: FLUSH
CLEAR Used to clear the screen and place the cursor in the
home position.
Example: CLEAR
BEEP Causes the speaker to emit a beep.
Example: BEEP
EMULATE Starts or stops ANSI standard terminal emulation.
Example: EMULATE TRUE
begins emulation.
EMULATE FALSE
ends emulation.
SPLIT Starts or stops Split-Screen operation.
Example: SPLIT SCREEN TRUE
begins Split-Screen.
SPLIT SCREEN FALSE
ends Split-Screen.
WHEN Sets up a string to trap out, while waiting with the
WAIT command. Whenever the indicated string is trapped,
then the response shown will be sent to the host. This
feature is mostly used to trap the "More" string and send
a Y or N to the host. If required by the host, a Carriage
Return maybe inserted in the response string by using a
| character.
Example: WHEN "More" THEN "N"
This will keep the WAIT command from getting stuck at
the "More" prompt. Note: only the most recent WHEN
command remains in effect.
XMIT Transmit using the Xmodem protocol.
Example: XMIT filename
Transmits a file to host.
XMIT *.pas
Transmits all files with the .PAS
extension on the default drive to
the host. Note: the host must be
Modem7 and/or Telink compatible if
wildcards are used.
YMODEM Transmit using the Ymodem protocol.
Example: YMODEM XMIT filename
Transmits a file to host, using Ymodem.
The word XMIT is optional.
RECV Receive using the Xmodem or Ymodem protocol. The host
selects which protocol to use and GT complies.
Example: RECV filename
Receives a single file from the host.
RECV *
Receives a batch of files from
the host. The filenames are
supplied by the host. Note: the
host must be Modem7 and/or Telink
compatible if the * is used. In this
form you MUST specify only the * or
the complete filename.
KERMIT RECV Receive a batch of files using the Kermit protocol.
Example: KERMIT RECV *
The file names are supplied by the host.
KERMIT XMIT Transmit a batch of files to the host using the
Kermit protocol.
Example: KERMIT XMIT filename
Transmit a single file to the host.
KERMIT XMIT *.dat
Transmit all files with the .DAT extension
to the host. Note: the batch of files
cannot exceed 30 files, otherwise the first
30 files that match the mask are transmitted.
CALL Invoke the execution of a nested script.
Example: CALL scriptname
This is alot like subroutines. The called
script will execute and Return to the calling
script when finished. Scripts may be nested
in this manner, to any desired depth (assuming
you have enough memory!). Turbo PASCAL's
ability to process recursive procedures makes
this feature possible.
CYCLE When found, it causes the script processor to repeat
execution of the script from the beginning. For example,
when you wish to make a script to dial a list of BBS's,
then repeat the script when finished it would look like
this:
NAME "xxxxxxxxxxxx"
DIAL "123-4567"
AUTOBAUD
ONLINE
END
NAME "yyyyyyyyyyyy"
DIAL "123-4567"
AUTOBAUD
ONLINE
END
.
. etc., etc...
.
CYCLE 5 TIMES
The CYCLE command in the example above would cause the
script to repeat 5 times. If the cycle count is not
specified, then 10 times is the default. Note: it is
not good practice to put script commands that toggle
between on/off states in a cycled script, unless you
cycle them back to the original state before the CYCLE
command is issued. Otherwise the command will cycle
on/off from execution to execution. An example of a
toggle command is DUPLEX or QUIET, you should put them
into initialization scripts and then cycle a CALLed
script. For example:
Script-a
--------
QUIET Toggle beeps off.
ECHO Toggle command echoing on.
AWAIT 1:30:00 Wait for 1:30 am.
CALL script-b Execute script-b.
Script-b
--------
NAME "xxxxxxxxxx" Name who we are calling.
DIAL "123-4567" Dial the modem.
.
. etc., etc...
.
CYCLE 5 TIMES Execute script-b 5 times.
Variable Variables can be assigned values in 2 ways, thru the
Assignment READLN command below, or within the script itself, they
can be assigned values, much the same way it is done in
FORTRAN and other high-level languages. The syntax is:
Vn = value
For example:
V0 = "the PC Interconnection"
V7 = "772-2090"
V2 = "Johnny Jones"
Note the use of blanks to isolate the "=" from the other
fields, this is REQUIRED.
READLN This command is used to read data from the operator into
one of the 10 variables. The variables have pre-assigned
names: V0 - V9. The syntax is:
READLN variable_name
For example:
WRITE "Enter desired time to start. (hh:mm:ss): "
READLN V2
AWAIT %2
Notice the %2 in the 3rd line of the example, the % tells
the script processor to do a variable substitution at this
point, so the value input for variable 2 is inserted into
the AWAIT command. Thus causing the script to pause until
the desired time.
Note: When resonding to a READLN, the user must type the
response followed by a Carriage Return. If the
user wants to terminate the script at the READLN
command, enter ^C followed by a Carriage Return.
CASE & ESAC Those of you familiar with UNIX should recognize the use
of ESAC, case spelled backward. For the others, ESAC is
used to mark the end of the CASE statement. The CASE
statement is used to test for truth or falsity of some
condition, for example it could be used to implement a
menu. The syntax is:
CASE target_value OF
op1 test_value1
statement-1
statement-2
.
.
.
op2 test_value2
statement-1a
statement-2a
.
.
.
.
.
.
ESAC
Where there may be any number of "op" tests and any number
of statements between "op" tests. The CASE statement will
perform the following test until it reaches the 1st one
that is TRUE, (target_value op test_value), if TRUE then
the statements associated with the test are executed. ONLY
one set of statements is selected, as soon as they have
completed the remaider are skipped, until the ESAC is
encountered. Execution continues after the ESAC. If no
test evaluates to TRUE, then all are skipped and execution
begins after the ESAC. Possible "op" codes are:
= Test for equality.
> Test if target_value greater than test_value.
< Test if target_value less than test_value.
>= Test if target_value greater than or equal test_value.
<= Test if target_value less than or equal test_value.
? If no other test prior to this evaluated to be TRUE,
then this will be TRUE. Usually placed just before
the ESAC. There is no need for a test_value
with this "op" code. This is a default operator.
For example:
CLEAR
WRITELN
WRITELN "Communications Menu"
WRITELN "-------------------"
WRITELN "1. Call the PC Interconnection BBS"
WRITELN "2. Call the Fido's Partner BBS"
WRITELN "3. Call the Dow-Jones News Retrieval Service"
WRITELN "4. Call the Compuserve BBS"
WRITELN "5. Exit to DOS"
WRITELN
WRITE "Enter your choice. "
READLN V1
CASE %1 OF
= 1
CALL PCINSCRP
= 2
CALL FIDOSCRP
= 3
CALL DOWJSCRP
= 4
CALL COMPSCRP
= 5
WRITELN "Goodbye, and thanks for using your computer."
WAIT 3000
EXIT
?
WRITELN
BEEP
BEEP
WRITELN "Your only choices are 1 thru 5."
WAIT 10000
CYCLE
ESAC
Notice how all fields are entered with "white space" between
them. This is required, as "=5" is wrong, and "= 5" is
correct.
Script Command Summary
----------------------
AUTOBAUD ......... Send a whacking Carriage Return to the host.
AWAIT ............ Wait for a specified time.
BEEP ............. Make a short beep on the system speaker.
BREAK ............ Send a "Space Break" to the host.
CALL ............. Invoke another script, like subroutines.
CAPTURE .......... Toggle capture mode ON/OFF.
CASE ............. Test the value of a variable.
CD ............... Change disk directories.
CLEAR ............ Clear the screen.
CYCLE ............ Repeat execution of the current script.
DDIAL ............ Dial a host from the phone directory.
DIAL ............. Dial the specified phone number.
Drive Change ..... Change the default disk drive.
DUPLEX ........... Toggle duplex between FULL/HALF.
ECHO ............. Echo script commands to the screen.
EMULATE .......... Set ANSI terminal emulation.
END .............. Groups commands with a DDIAL or DIAL command.
ESAC ............. Terminates a CASE command.
EXCH ............. Change to a different phone directory.
EXIT ............. Used to exit the program.
FLUSH ............ Throw away the contents of the serial buffers.
HANG-UP .......... Hang up the modem.
KERMIT ........... Transmit or receive via Kermit protocol.
NAME ............. Used with DIAL command to name the host.
ONLINE ........... Allows user to temporarily leave the script.
PRINT ............ Toggles the printer ON/OFF.
QUIET ............ Toggles the beeper ON/OFF.
READLN ........... Reads input from keyboard into a variable.
RECV ............. Receive a file via Xmodem, Ymodem or Telink protocols.
SCREEN ........... Toggle screen output ON/OFF while WAIT is active.
SEND ............. Send a string to the host.
SENDLN ........... Send a string to the host, followed by Carriage Return.
SET .............. Used with DIAL command to manually set comm params.
SPLIT ............ Set split screen mode.
TWAIT ............ Timed wait in milleseconds, max wait is 32 seconds.
Variable Assign .. Assign a value to a variable.
WAIT ............. Wait for some string to be received from host.
WHEN ............. Trap a string sent from host and respond.
WRITE ............ Write a string to the screen.
WRITELN .......... Write a string to the screen, followed by Carriage Return.
XMIT ............. Transmit a file via Xmodem or Telink protocols.
YMODEM ........... Transmit a file via Ymodem protocol.